package test.test1;



import java.util.Calendar;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import test.test1.mybatis.pojo.Question;
import test.test1.mybatis.pojo.ELTest1;
import test.test1.mybatis.pojo.Player;

/**
 * Hello world!
 *
 */
public class SpringEL 
{
    public static void main( String[] args )
    {
    	
//    	springDemo();
    	springClassDemo();//throw error
//    	springClassDemo2();
    }
    
    
    
    private static void springDemo() {
    	ApplicationContext context =
    		    new ClassPathXmlApplicationContext("springEL.xml");
    	Question q = context.getBean("questionname", Question.class);
    	System.out.println(q);
    	System.out.println(q.getPlayer());
    	System.out.println("=======================");
    	
    }
 
    
    private static void springClassDemo() {
    	ApplicationContext context =
    		    new ClassPathXmlApplicationContext("springEL.xml");
    	ELTest1 test = context.getBean("list", ELTest1.class);
    	System.out.println(test.getList().get(0));
    	System.out.println(test.getMap().get("name"));
    }
    
    
}
